<?php

declare(strict_types=1);

namespace app\seller\validate\admin;

use sheep\validate\Backend;

class Nurse extends Backend
{
    protected $rule = [
        'nurse_number'       => 'require|number|max:8|unique:nurse,shop_id',
        'nurse_name'         => 'require|max:255',
        'brief_introduction' => 'max:150',
        'proficient_content' => 'max:30',
        'nurse_type_id'      => 'require',
        'nurse_life'         => 'number',
    ];

    protected $message = [
        'nurse_name.require'     => '请填写店员名称',
        'nurse_name.max'         => '品牌名称最多不超过255个字符',
        'nurse_number.require'   => '请输入店员编号',
        'nurse_number.number'    => '店员编号只能为数字',
        'nurse_number.max'       => '店员编号最多不超过8个字符',
        'nurse_number.unique'    => '店员编号已存在',
        'brief_introduction.max' => '简介内容输入最多不超过150个字符',
        'proficient_content.max' => '擅长内容输入最多不超过30个字符',
        'nurse_type_id.require'  => '请选择店员类型',
        'nurse_life.number'      => '请输入正确的从业时间',
    ];


    protected $scene = [
        'add'  => ['nurse_name', 'nurse_number', 'brief_introduction', 'proficient_content', 'nurse_type_id', 'nurse_life'],
        'edit' => ['nurse_name', 'nurse_number' ,'brief_introduction', 'proficient_content', 'nurse_type_id', 'nurse_life'],
    ];
}
